using System;
using System.Collections.Generic;
using System.Text;
using Weazel.Microblaze.Simulator.Engine;

namespace Weazel.Microblaze.Simulator.Components.Opb
{
    public abstract class OpbSlaveBase : Component, IOpbSlave
    {
        private Opb opb;
        public Opb Opb
        {
            get { return opb; }
            set { opb = value; }
        }

        private uint lowAddress;
        public uint LowAddress
        {
            get { return lowAddress; }
            set { lowAddress = value; }
        }

        private uint highAddress;
        public uint HighAddress
        {
            get { return highAddress; }
            set { highAddress = value; }
        }

        public virtual void BeginIdleTransaction() { }
        public abstract void BeginTransaction(Transaction transaction);
        public abstract void Load(byte[] bytes, uint address);

        public override void Run()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public OpbSlaveBase(Simulator.Engine.SimulationContext context)
            : base(context)
        {
        }
    }
}
